from django.urls import path, include
from . import views
from . import views_hzfw
from . import views_jy_sync
from . import views_xucloud
from . import views_digital_sign

urlpatterns = [
    path(r'common/download_file/<path:url>',views.download_file),
    path(r'common/gen_serial_number/<str:company_name>', views.gen_serial_number), # 自增生成序列号通用方法
    path(r'<str:company_name>/reset_serial_number', views.reset_serial_number), # 自增生成序列号通用方法
    path(r'common/update_report_attachment/<str:company_name>', views.update_report_attachment),
    path(r'<str:company_name>/gen_docx_by_model/<str:model_id>', views.gen_docx_by_model),  # 根据word模版渲染
    path(r'<str:company_name>/gen_report_xlsx/<str:model_id>', views.gen_report_xlsx),  # 自动生成报告
    path(r'<str:company_name>/create_detection_model', views.create_detection_model),  
    path(r'<str:company_name>/load_original_record', views.load_original_record),  
    path(r'<str:company_name>/attachment_to_xmoffice', views.attachment_to_xmoffice),  
    path(r"<str:company_name>/print_form_data/<str:model_id>",views.print_form_data), # 根据宜搭表单打印模版
    path(r"<str:company_name>/gen_form_data_pdf_by_model/<str:model_id>",views.gen_form_data_pdf_by_model), # 根据宜搭表单生成pdf存入表单组件
    path(r"<str:company_name>/batch_print_yida_file",views.batch_print_yida_file), #批量打印宜搭表单中附件文件
    path(r"<str:company_name>/batch_print",views.batch_print), #批量打印(一张表)
    path(r"<str:company_name>/get_associate_certificate_info",views.get_associate_certificate_info), # 获取协会证书信息
    path(r'<str:company_name>/gen_serial_number_v2', views.gen_serial_number_v2), # 自增生成序列号通用方法V2
    path(r'<str:company_name>/reset_serial_number_v2', views.reset_serial_number_v2), # 自增生成序列号通用方法V2
    path(r'<str:company_name>/current_serial_number_v2', views.current_serial_number_v2), # 获取当前序列号通用方法V2
    path(r'<str:company_name>/copy_form_data', views.copy_form_data), # 复制表单数据
    path(r'<str:company_name>/copy_process_data', views.copy_process_data), # 复制流程数据
    path(r"<str:company_name>/cache_form_data",views.cache_form_data), # 缓存表单数据
    path(r"<str:company_name>/compare_code_in_doc",views.compare_code_in_doc), # 验证文档中每页存在指定编号

    # 材料相关接口
    path(r'<str:company_name>/upload-price-shell', views.upload_price_shell),  # 上传自定义清单
    path(r'<str:company_name>/prepare-price-shell', views.prepare_price_shell),  # 加载自定义清单
    path(r'<str:company_name>/get-single-price', views.get_single_price),  # 获取参数单价

    # xu云平台相关接口
    path(r'<str:company_name>/sign_name_to_full_report', views_xucloud.sign_name_to_full_report), # 根据模版落签
    path(r"<str:company_name>/get_detection_model_list",views_xucloud.get_detection_model_list), #获取模版列表
    path(r'<str:company_name>/get_xm_qualification_options', views_xucloud.get_xm_qualification_options), # 获取检测大类
    path(r'<str:company_name>/get_xm_exam_category', views_xucloud.get_xm_exam_category), # 获取检测大类
    path(r'<str:company_name>/get_xm_exam_items', views_xucloud.get_xm_exam_items), # 获取检测项目
    path(r'<str:company_name>/get_xm_exam_item_detail', views_xucloud.get_xm_exam_item_detail), # 获取检测项目详情
    path(r'<str:company_name>/get_xm_exam_params', views_xucloud.get_xm_exam_params), # 获取检测参数
    path(r'<str:company_name>/calc_xm_cost', views_xucloud.calc_xm_cost), # 获取本组计费
    path(r'<str:company_name>/get_detection_config', views_xucloud.get_detection_config), # 获取检测项目配置
    path(r'<str:company_name>/start-cutout-task', views_xucloud.start_cutout_task), # 发起视频监控截取任务
    path(r'<str:company_name>/fake-sign', views_xucloud.fake_sign), # 发起伪签署
    

    # 杭州防伪码
    path(r'<str:company_name>/apply-hzfw-qr', views_hzfw.apply_hzfw_qr),
    path(r'<str:company_name>/upload-hzfw-data', views_hzfw.upload_hzfw_data),
    path(r'<str:company_name>/download_hzfw_pdf', views_hzfw.download_hzfw_pdf),
    path(r'<str:company_name>/apply_hzfw_qr_ex', views_hzfw.apply_hzfw_qr_ex),


    # 建研工程
    path(r'<str:company_name>/get_jy_project_list_sqlsever_2008', views_jy_sync.get_jy_project_list_sqlsever_2008), #分页查询建研工程列表
    path(r'<str:company_name>/async_jy_project_list_sqlsever_2008', views_jy_sync.async_jy_project_list_sqlsever_2008), #分页查询建研工程列表
    # 同步项目
    path(r'<str:company_name>/sync_project_jy_sqlserver_to_yida',views_jy_sync.sync_project_jy_sqlserver_to_yida), # 同步工程数据库数据到宜搭
    path(r'<str:company_name>/sync_project_yida_to_jy_sqlserver',views_jy_sync.sync_project_yida_to_jy_sqlserver), # 反向同步工程宜搭到数据库
    # 同步委托
    path(r'<str:company_name>/sync_current_record_jy_sqlserver_to_yida',views_jy_sync.sync_current_record_jy_sqlserver_to_yida), # 同步委托到宜搭
    path(r'<str:company_name>/sync_current_record_yida_to_jy_sqlserver',views_jy_sync.sync_current_record_yida_to_jy_sqlserver), # 反向同步委托宜搭到数据库

    # 电子签章相关接口
    path(r'<str:company_name>/view-signed-document', views_digital_sign.view_signed_documnent),

    # 客户定制化接口
    path(r'chengxiang/', include("yida_app_service.chengxiang.urls")),
    path(r'chengxiang_2025/', include("yida_app_service.chengxiang_2025.urls")),
    path(r'nanxing/', include("yida_app_service.nanxing.urls")),
    path(r'zhongxin/', include("yida_app_service.zhongxin.urls")),
    path(r'jianhong/', include("yida_app_service.jianhong.urls")),
    path(r'shujian/', include("yida_app_service.shujian.urls")),
    path(r'zhongji/', include("yida_app_service.zhongji.urls")),
    path(r'zhongcheng/', include("yida_app_service.zhongcheng.urls")),
    path(r'shunwei/', include("yida_app_service.shunwei.urls")),
    path(r'xiaming/', include("yida_app_service.xiaming.urls")),
    path(r'haorui/', include("yida_app_service.haorui.urls")),
    path(r'sanhe/', include("yida_app_service.sanhe.urls")),
    path(r'linanzjz/', include("yida_app_service.linanzjz.urls")),
    path(r'dingfeng/', include("yida_app_service.dingfeng.urls")),
]
